package com.aim.nada;

import java.util.Hashtable;
import org.ksoap2.serialization.PropertyInfo;
import org.ksoap2.serialization.SoapSerializationEnvelope;

public class GetTokenRequest extends BaseObject {
	public String Username;
	public String Password;

	public Object getProperty(int index) {
		if (index == 0) {
			return Username;
		} else {
			return Password;
		}
	}

	public int getPropertyCount() {
		return 2;
	}

	public void getPropertyInfo(int index, Hashtable properties,
			PropertyInfo info) {
		info.type = PropertyInfo.STRING_CLASS;
		if (index == 0) {
			info.name = "Username";
		} else {
			info.name = "Password";
		}
	}

	public void setProperty(int index, Object value) {
		throw new RuntimeException("Request.setProperty is not implemented yet");
	}

	public void register(SoapSerializationEnvelope envelope) {
		envelope.addMapping(NAMESPACE, "GetTokenRequest", this.getClass());
	}
}
